# 1.通过while循环输出1-100之间所有的数字
'''
num = 1
while num <= 100:
    print(num)
    num += 1

# 2.输出1-100之间所有的偶数
num = 1
while num <= 100:
    if num % 2 == 0:
        print(num)
    num += 1

# 3.输出1-100之间能被5或者7 整除的所有的数字
num = 1
while num <= 100:
    if num % 5 == 0 or num % 7 == 0:
        print(num)
    num += 1


# 计算1-100之间所有的数字的和
num = 1
sum = 0 # 定义变量,接收所有数字的和
while num <= 100:
    sum = sum + num
    num += 1
print(sum)

# 计算1-100之间所有能被9整除的数字的和
num = 1
sum = 0
while num <= 100:
    if num % 9 == 0:
        sum += num
    num += 1
print(sum)

'''

# 统计1-300之间能被7整除并且是偶数的数字的个数
num = 1
count = 0
while num <= 300:
    if num % 7 == 0 and num % 2 == 0:
        count += 1
    num += 1
print(count)




